package jdmx.framework.common.envelopes;

import jdmx.framework.common.Envelope;
import jdmx.library.da.DataTable;
import jdmx.library.da.Filter;
import jdmx.library.da.IdList;
import jdmx.library.da.Pager;
import jdmx.library.da.Sorter;

public class EnvelopeUntyped extends Envelope {
	public EnvelopeUntyped() {
		envelopeType = "untyped";
	}
	
	/**
	 * DataTable
	 * 
	 * obiectul "DataTable" intors de metoda "read"
	 * obiectul "DataTable" folosit de "create"
	 * obiectul "DataTable" folosit de "update"
	 */
	public DataTable getDatatable() { return (DataTable) getItem("DataTable");	}
	public void setDatatable(DataTable dataTable) { setItem("DataTable", dataTable); }
	
	/**
	 * IdList
	 * 
	 * lista de id-uri folosite la stergere
	 * si intoarse la creare 
	 */
	public IdList getIdList() { return (IdList) getItem("IdList");	}
	public void setIdList(IdList idList) { setItem("IdList", idList); }

	/**
	 * Pager
	 * 
	 * obiectul care stocheaza informatiile despre recordset
	 * - pagina curenta
	 * - dimensiunea paginii
	 * - nr. total de inregistrari
	 */
	public Pager getPager() { return (Pager) getItem("Pager");	}
	public void setPager(Pager pager) { setItem("Pager", pager); }
	
	/**
	 * Sorter
	 * 
	 * obiectul care stocheaza informatiile despre
	 * sortarea coloanelor in grid
	 */
	public Sorter getSorter() { return (Sorter) getItem("Sorter");	}
	public void setSorter(Sorter sorter) { setItem("Sorter", sorter); }
	
	/**
	 * Filter
	 * 
	 * obiectul folosit la "read"
	 */
	public Filter getFilter() { return (Filter) getItem("Filter");	}
	public void setFilter(Filter filter) { setItem("Filter", filter); }
}

